package com.zhanghp.class05.compare;

import java.util.Collection;

/**
 * @author zhanghp
 * @since 2023/11/18 15:24
 */
public class Student {
    public String name;
    public int id;
    public int age;

    public Student(String name, int id, int score) {
        this.name = name;
        this.id = id;
        this.age = score;
    }

    public static void printStudent(Student[] students){
        if (students.length == 0) {
            return;
        }
        for (Student it : students) {
            System.out.println(it.name + "," + it.id + "," + it.age);
        }
    }

    public static void printStudent(Collection<Student> students){
        if (students.size() == 0) {
            return;
        }
        for (Student it : students) {
            System.out.println(it.name + "," + it.id + "," + it.age);
        }
    }
}
